package com.rolfhoward.video.record.camera

import com.rolfhoward.video.record.inner.CameraRatioType

/**
 *@author wuqiubin
 *@date 2023/1/15
 *@Describe 相机基础参数信息
 */
class CameraParams {

    var mFacingFront: Boolean = false //是否是前置摄像头
    var mRatioType: Int = CameraRatioType.RATIO_3_4//分辨率尺寸
    var mFlashOpen: Boolean = false //是否开启闪光灯

    /** 相机基础参数实例* */
    companion object{
        private var instance:CameraParams? = null
        fun getInstance():CameraParams{
            if (instance == null){
                synchronized(CameraParams::class.java){
                    if (instance == null){
                        instance = CameraParams()
                    }
                }
            }
            return instance!!
        }
    }

    /**
     * 初始化参数
     * */
    init {
        mFacingFront = false
        mRatioType = CameraRatioType.RATIO_9_16
        mFlashOpen = false
    }
}